From: Michael Catanzaro Date: Sun, 27 Jul 2025 15:35:58 +0000 (+0200) Subject: portalHelper: Add extra check for policy decision type X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~88^2~9^2^2~35 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=6fbcad9180930f874f511db27c8f27e476a8b90b;p=gnome-shell.git portalHelper: Add extra check for policy decision type This check will always be true currently, because there are only three possible types of policy decisions, and both of the others are already handled above. But if new policy decision types are ever added in the future, then we probably don't want to execute this code. Part-of: (cherry picked from commit c9a93ec66ee722d58aeb3727eb7d606b3704b79b) --- diff --git a/js/portalHelper/main.js b/js/portalHelper/main.js index 9d420138c..60b419d45 100644 --- a/js/portalHelper/main.js +++ b/js/portalHelper/main.js @@ -238,6 +238,9 @@ class PortalWindow extends Gtk.ApplicationWindow { return true; } + if (type !== WebKit.PolicyDecisionType.NAVIGATION_ACTION) + return false; + const uri = GLib.Uri.parse(request.get_uri(), HTTP_URI_FLAGS); if (uri.get_host() !== this._uri.get_host() && this._originalUrlWasGnome) {